package com.trust.controller;


import com.trust.agri.response.ResponseResult;
import com.trust.entity.SetupLand;
import com.trust.service.SetupLandService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@Slf4j
@RequestMapping("/api/setup/land")
@Api(value = "基础设置 - 地块管理", tags = "基础设置 - 地块管理")
public class SetupLandController {

    @Resource
    private SetupLandService service;


    @GetMapping("/list/all")
    @ApiOperation("获取所有地块颜色")
    public ResponseResult<List<SetupLand>> listAll(){
        List<SetupLand> result = service.listAll();
        return ResponseResult.ok(result);
    }
}
